import EmptyUtils from './utils/EmptyUtils.js'
import NetUtils from './utils/NetUtils.js'
import Api from './config/Api.js'
import LoginLogic from './logic/LoginLogic.js'

App({
  onLaunch: function () {
    var wxSessionKey, wxOpenId;
    var that = this;


    // 展示本地存储能力
    var logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    that.globalData.userInfo = wx.getStorageSync('userInfo')

    LoginLogic.login(function(res){
      that.globalData.userInfo = wx.getStorageSync('userInfo')
    })
  },

  globalData: {
    userInfo: null
  }
})